fix linting warnings - #9103
Conversation
Signed-off-by: Vaivaswat <vaivaswat2244@gmail.com>
c8f12be to
8285f24
Compare
ksen0
left a comment
There was a problem hiding this comment.
Thanks for this, I did some spot checks. If tests all pass then its fine, however I did see changes in the test suite, could you briefly clarify please?
| * Expects an image file and a p5 instance with an image file loaded and drawn | ||
| * and checks that they are exactly the same. Sends result to the callback. | ||
| */ | ||
| var testImageRender = function (file, sketch) { |
There was a problem hiding this comment.
Sorry if this is obvious, but why removed?
There was a problem hiding this comment.
It was flagged by no-unused-vars in lint CI, which is accurate as written: its only two callers are commented-out tests in this same file ("should draw image with defaults" and "should draw cropped image" ). Both parked behind TODOs about delegating to visual tests and platform-dependent image resizing. So deleting it changed no coverage, but it did strip the scaffolding those TODOs depend on, and it's likely useful whenever someone picks them up.
I'll comment out the helper alongside its callers instead, with a note to restore them together. Lint stays clean, and nothing is lost. Will do the same for createDummyFile in test/unit/dom/dom.js, which was in exactly the same position.
There was a problem hiding this comment.
Thanks for the explanation and update, makes sense!
Resolves partially: #9070
Changes:
Fixes all 143 oxlint warnings; npm run lint now exits clean. No lint config was changed. Every warning was resolved in code.
Mostly mechanical:
One behaviour change worth review:
Renderer3Ddeclaredremove()twice. The first (canvas teardown, added in 2fa995a) was silently shadowed by a second added later in ef28cbc for_textCanvas, sowrappedEltcleanup has never run. I merged them,Renderer2D.remove()has the identical four lines, which is what it was meant to mirror. WebGL/WebGPU canvases are now actually detached on remove().Two edits look behavioural but aren't: return FES.internalError(...) is unreachable (it always throws), and if (0) → if (debug) in textCore.js uses a param that arrives falsy.
Screenshots of the change:
PR Checklist
Verification
WebGPU visual cases and p5.RendererWebGPU were not run locally cuz no software WebGPU adapter available :) leaving those to CI.